/**
 * @title feature-
 * @description
 * @author 张玉华
 * @date 2020-11-16 09:44
 */

import { createParamDecorator, ExecutionContext } from '@nestjs/common';

export const User = createParamDecorator(
  (data: unknown, ctx: ExecutionContext) => {
    const request = ctx.switchToHttp().getRequest();
    return request.user;
  },
);
